<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <title>首页——投票系统管理</title>
        <meta content="Vote system" name="description" />
        <meta content="beifengtz" name="author" />
        <link rel="shortcut icon" href="../images/vote.ico">
        <link rel="stylesheet" href="assets/layui/css/layui.css">
        <link rel="stylesheet" href="../css/admin/index.css">
    </head>
    <body class="layui-layout-body" >
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->


    <div class="layui-layout layui-layout-admin">
        <div class="layui-header">
            <div class="layui-logo">投票系统后台管理</div>
            <ul class="layui-nav layui-layout-right">
                <li class="layui-nav-item">
                    <a href="javascript:;">
                        <img src="../images/admin-head.png" class="layui-nav-img">
                        Admin
                    </a>
                    <dl class="layui-nav-child">
                        <dd><a href="">操作日志</a></dd>
                        <dd><a href="">安全设置</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="javascript:logOut();">退出</a></li>
            </ul>
        </div>

        <div class="layui-side">
            <div class="layui-side-scroll layui-bg-black">
                <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                    <li class="layui-nav-item"><a href="index.html"><i class="layui-icon layui-icon-chart-screen" style="color: #cca2e1"></i>&nbsp;系统管理</a></li>
                    <li class="layui-nav-item">
                        <a class="" href="javascript:;"><i class="layui-icon layui-icon-form" style="color:#ffe867"></i>&nbsp;投票管理</a>
                        <dl class="layui-nav-child">
                            <dd><a href="first-vote.html"><i class="layui-icon layui-icon-cellphone" style="color:#e8eaa1"></i>&nbsp;第一轮投票</a></dd>
                            <dd><a href="second-vote.html"><i class="layui-icon layui-icon-template" style="color:#ffe867"></i>&nbsp;第二轮投票</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a class="" href="javascript:;"><i class="layui-icon layui-icon-friends" style="color:#f2f4fb"></i>&nbsp;评委管理</a>
                        <dl class="layui-nav-child">
                            <dd><a href="rater.html"><i class="layui-icon layui-icon-username" style="color:#f2f4fb"></i>&nbsp;查看评委</a></dd>
                            <dd><a href="new-rater.html"><i class="layui-icon layui-icon-edit" style="color:#f2f4fb"></i>&nbsp;新增评委</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item"><a href="../first-current.html" target="_blank"><i class="layui-icon layui-icon-rate-half" style="color:#d7acd4"></i>&nbsp;第一轮实时结果</a></li>
                    <li class="layui-nav-item"><a href="../first-final.html" target="_blank"><i class="layui-icon layui-icon-rate" style="color:#933f99"></i>&nbsp;第一轮最终结果</a></li>
                    <li class="layui-nav-item"><a href="../second-final.html" target="_blank" ><i class="layui-icon layui-icon-rate-solid" style="color:#be3737"></i>&nbsp;第二轮投票</a></li>
                    <li class="layui-nav-item"><a href="javascript:lockScreen();"><i class="layui-icon layui-icon-vercode" style="color: #f47645"></i>&nbsp;安全锁屏</a></li>
                </ul>
            </div>
        </div>

        <div class="layui-body padding-15">
            <fieldset class="layui-elem-field">
                <legend>系统管理</legend>
                <div class="layui-field-box">
                    <div class="layui-container">
                        <blockquote class="layui-elem-quote">说明：在这里你可以决定系统状态及投票状态。</blockquote>
                        <div class="layui-row">
                            <!--设置系统状态-->
                            <div class="layui-col-xs12 layui-col-sm6 layui-col-md5 ">
                                <div class="margin-15">
                                    <form class="layui-form" id="currentVoteForm">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">系统开关</label>
                                            <div class="layui-input-block">
                                                <input type="radio" name="system" value="1" title="开启系统"  id="openSystem" checked>
                                                <input type="radio" name="system" value="0" title="关闭系统" >
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">当前轮次</label>
                                            <div class="layui-input-block">
                                                <select  lay-filter="voteField" name="voteField" id="voteField">
                                                    <option value="1">第一轮</option>
                                                    <option value="2">第二轮</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-form-item" id="collegeChooseBox">
                                            <label class="layui-form-label">投票组别</label>
                                            <div class="layui-input-block">
                                                <select lay-verify="required"  name="currentCollege" id="currentCollege">
                                                    <option value="1">信息工程学院</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div id="secondNotice">您选择了当前答辩轮次为第二轮，请记得前往“投票管理”设置第二轮答辩人信息。</div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-input-block">
                                                <button type="button" class="layui-btn layui-btn-normal" onclick="changeCurrentStats()">立即保存</button>
                                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <!--显示系统状态-->
                            <div class="layui-col-xs12 layui-col-sm6 layui-col-md5 layui-col-md-offset2  lang-label">
                                <form class="layui-form">
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">系统状态</label>
                                        <div class="layui-input-inline">
                                            <input type="text"  placeholder="这里显示系统状态" autocomplete="off" class="layui-input" id="systemStatsShow" disabled>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">当前轮次</label>
                                        <div class="layui-input-inline">
                                            <input type="text"  placeholder="这里显示当前轮次" autocomplete="off" class="layui-input" id="voteFieldShow" disabled>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">当前投票组别</label>
                                        <div class="layui-input-inline">
                                            <input type="text"  placeholder="这里显示当前投票组别" autocomplete="off" class="layui-input" id="currentCollegeShow" disabled>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">该组别人数</label>
                                        <div class="layui-input-inline">
                                            <input type="text"  placeholder="这里显示该组别人数" autocomplete="off" class="layui-input" id="currentCandidateNumShow" disabled>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">当前组别投票状态</label>
                                        <div class="layui-input-inline">
                                            <input type="text"  placeholder="这里显示当前组别投票状态" autocomplete="off" class="layui-input" id="startCollegeVoteStatsShow" disabled>
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <div class="layui-input-block">
                                            <button  type="button" class="layui-btn layui-btn-warm" onclick="startVote()">开始投票</button>
                                            <button  type="button" class="layui-btn layui-btn-danger" onclick="stopVote()">停止投票</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <blockquote class="layui-elem-quote">说明：在这里你可以设置投票标题信息。</blockquote>
                        <div class="layui-row">
                            <div class="layui-col-xs12 layui-col-sm6 layui-col-md5 ">
                                <div class="padding-15">
                                    <form class="layui-form">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">标题全称</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="title" required id="sysTitle" lay-filter="title" lay-verify="required" placeholder="请填入投票系统标题全称" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">标题简称</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="singleTitle" maxlength="12" required id="sysSingleTitle" lay-filter="singleTitle" lay-verify="required" placeholder="请填入投票系统标题简称" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-input-block">
                                                <button type="button" class="layui-btn layui-btn-normal" onclick="setSysTitle()">立即保存</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </fieldset>
        </div>

        <div class="layui-footer">
            © 2018 四川农业大学 Powered by <a href="http://www.wingstudio.org" target="_blank">WingStudio</a>&nbsp;<b>·</b>&nbsp;<a
                href="http://www.beifengtz.com" target="_blank">beifengtz</a>
        </div>
    </div>

    <script src="../js/jquery-3.3.1.min.js"></script>
    <script src="assets/layui/layui.all.js"></script>
    <script src="../js/admin/index.js"></script>
    </body>
</html>